/*
 * @features: 主要功能
 * @description: 内容说明
 * @Date: 2021-09-29 15:11:54
 * @Author: judu233(769471424@qq.com)
 * @LastEditTime: 2021-10-02 18:25:27
 * @LastEditors: judu233
 */
import c3d from "../../cc";
declare module "cc" {
    /**设置游戏速率 */
    export function kSetSpeed(speed: number): void;
    /**获取游戏速率 */
    export function kGetSpeed(): number;
    export interface Director {
        _kSpeed: number;
        calculateDeltaTime(now: number): void;
    }
}



// 游戏速率
c3d.director._kSpeed = 1;
let _originCalculateDeltaTime = c3d.Director.prototype.calculateDeltaTime;
c3d.director.calculateDeltaTime = function (now) {
    _originCalculateDeltaTime.call(this, now);
    this._deltaTime *= this._kSpeed;
}
